const path = require('path');

function resolve(dir) {
    return path.join(__dirname, dir)
}

module.exports = {
    publicPath: process.env.NODE_ENV === 'development'
    ? '/'
    : './',

    assetsDir: process.env.NODE_ENV === 'development'
    ? 'static'
    : 'static',

    filenameHashing: false,
    
    devServer :{
        host: '0.0.0.0',
        port: 8888,
        compress: true,
        disableHostCheck: true,
        proxy: "http://localhost:8080/",
    },

    chainWebpack: (config) => {
        config.resolve.alias
        .set('@components', resolve('src/components'))
        .set('@views', resolve('src/views'))
        .set('@widget', resolve('src/widget'))
        .set('@utils', resolve('src/utils'))
        .set('@http',resolve('src/http'))
        .set('@service',resolve('src/service'))
    }


}